package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CancellationPoliciesMapper;
import com.ruoyi.system.domain.CancellationPolicies;
import com.ruoyi.system.service.ICancellationPoliciesService;

/**
 * 取消政策Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-25
 */
@Service
public class CancellationPoliciesServiceImpl implements ICancellationPoliciesService 
{
    @Autowired
    private CancellationPoliciesMapper cancellationPoliciesMapper;

    /**
     * 查询取消政策
     * 
     * @param id 取消政策主键
     * @return 取消政策
     */
    @Override
    public CancellationPolicies selectCancellationPoliciesById(Long id)
    {
        return cancellationPoliciesMapper.selectCancellationPoliciesById(id);
    }

    /**
     * 查询取消政策列表
     * 
     * @param cancellationPolicies 取消政策
     * @return 取消政策
     */
    @Override
    public List<CancellationPolicies> selectCancellationPoliciesList(CancellationPolicies cancellationPolicies)
    {
        return cancellationPoliciesMapper.selectCancellationPoliciesList(cancellationPolicies);
    }

    /**
     * 新增取消政策
     * 
     * @param cancellationPolicies 取消政策
     * @return 结果
     */
    @Override
    public int insertCancellationPolicies(CancellationPolicies cancellationPolicies)
    {
        return cancellationPoliciesMapper.insertCancellationPolicies(cancellationPolicies);
    }

    /**
     * 修改取消政策
     * 
     * @param cancellationPolicies 取消政策
     * @return 结果
     */
    @Override
    public int updateCancellationPolicies(CancellationPolicies cancellationPolicies)
    {
        return cancellationPoliciesMapper.updateCancellationPolicies(cancellationPolicies);
    }

    /**
     * 批量删除取消政策
     * 
     * @param ids 需要删除的取消政策主键
     * @return 结果
     */
    @Override
    public int deleteCancellationPoliciesByIds(Long[] ids)
    {
        return cancellationPoliciesMapper.deleteCancellationPoliciesByIds(ids);
    }

    /**
     * 删除取消政策信息
     * 
     * @param id 取消政策主键
     * @return 结果
     */
    @Override
    public int deleteCancellationPoliciesById(Long id)
    {
        return cancellationPoliciesMapper.deleteCancellationPoliciesById(id);
    }
}
